<div class="header_menu">
    <div class="container">
        <div class="header-nav clearfix">
            <?php echo $this->partial('shop/layout/headerMenu'); ?>
        </div>
    </div>
</div>
</div>
<div class="container breadcrumbs">
    <a href="<?php echo $this->url('shop'); ?>"><?php echo $this->translate('首页'); ?></a>
    <span class="sep">/</span><span><?php echo $this->translate('优惠券'); ?></span>
</div>
<div class="container">
    <div class="uc-full-box">
        <div class="row">
            <div class="span4">
                <?php echo $this->partial('shop/partial/home/leftMenu'); ?>
            </div>
            <div class="span16">
                <div class="xm-line-box uc-box uc-favorite-box">
                    <h3 class="right-more-title">
                        <?php echo $this->translate('我的优惠券'); ?>
                    </h3>
                    <div class="box-hd-more">
                        <div class="pull-left left-menu-more">
                            <div class="uc-order-list-type">
                                <a <?php if ($this->state == '') echo 'class="current"'; ?> href="<?php echo $this->url('home-user-coupon', []); ?>"><?php echo $this->translate('全部优惠券'); ?></a>
                                <span class="sep">|</span>
                                <a <?php if ($this->state == '1') echo 'class="current"'; ?> href="<?php echo $this->url('home-user-coupon', [], ['query' => ['state'=>'1']]); ?>"><?php echo $this->translate('可用优惠券'); ?></a>
                                <span class="sep">|</span>
                                <a <?php if ($this->state == '0') echo 'class="current"'; ?> href="<?php echo $this->url('home-user-coupon', [], ['query' => ['state'=>'0']]); ?>"><?php echo $this->translate('未生效优惠券'); ?></a>
                                <span class="sep">|</span>
                                <a <?php if ($this->state == '2') echo 'class="current"'; ?> href="<?php echo $this->url('home-user-coupon', [], ['query' => ['state'=>'2']]); ?>"><?php echo $this->translate('已用优惠券'); ?></a>
                                <span class="sep">|</span>
                                <a <?php if ($this->state == '3') echo 'class="current"'; ?> href="<?php echo $this->url('home-user-coupon', [], ['query' => ['state'=>'3']]); ?>"><?php echo $this->translate('过期优惠券'); ?></a>
                            </div>
                        </div>
                    </div>
                    <div class="box-bd">
                        <?php if ($this->userCouponList->getCurrentItemCount() > 0) { ?>
                            <table class="table table-bordered table-hover" style="margin-top: 15px;">
                                <thead>
                                <tr>
                                    <th width="15%"><?php echo $this->translate('优惠券名称'); ?></th>
                                    <th width="25%"><?php echo $this->translate('优惠券描述'); ?></th>
                                    <th width="8%"><?php echo $this->translate('状态'); ?></th>
                                    <th width="22%"><?php echo $this->translate('有效期'); ?></th>
                                    <th width="20%"><?php echo $this->translate('使用优惠券的订单号'); ?></th>
                                </tr>
                                </thead>
                                <?php foreach ($this->userCouponList as $couponValue) {
                                    ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($couponValue->getCouponTitle()); ?></td>
                                        <td><?php echo $this->escapeHtml($couponValue->getCouponInfo()); ?></td>
                                        <td><?php echo $this->userCouponStateArray[$couponValue->getCouponUseState()]; ?></td>
                                        <td><?php echo $this->shopHelper()->effectiveTime($couponValue->getCouponUseStartTime(), $couponValue->getCouponUseEndTime()); ?></td>
                                        <td><?php echo $couponValue->getUsedOrderSn(); ?></td>
                                    </tr>
                                <?php } ?>
                            </table>
                            <div>
                                <?php echo $this->paginationControl($this->userCouponList, 'Sliding', 'shop/page', ['route' => 'home-user-coupon']); ?>
                            </div>
                        <?php } else { ?>
                            <?php echo $this->translate('暂无优惠券!'); ?>
                        <?php } ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>